{extend name="base" /}
{block name="css"}
<style>
    /** 应用快捷块样式 */
    .console-app-group {
        padding: 16px;
        border-radius: 4px;
        text-align: center;
        background-color: #fff;
        cursor: pointer;
    }

    .console-app-group .console-app-icon {
        width: 32px;
        height: 32px;
        line-height: 32px;
        margin-bottom: 6px;
        display: inline-block;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        font-size: 32px;
        color: #69c0ff;
    }

    .console-app-group:hover {
        box-shadow: 0 0 15px rgba(0, 0, 0, .08);
    }

    /** //应用快捷块样式 */

    /** 小组成员 */
    .console-user-group {
        position: relative;
        padding: 10px 0 10px 60px;
    }

    .console-user-group .console-user-group-head {
        width: 32px;
        height: 32px;
        position: absolute;
        top: 50%;
        left: 12px;
        margin-top: -16px;
    }

    .console-user-group .layui-badge {
        position: absolute;
        top: 50%;
        right: 8px;
        margin-top: -10px;
    }

    .console-user-group .console-user-group-name {
        line-height: 1.2;
    }

    .console-user-group .console-user-group-desc {
        color: #8c8c8c;
        line-height: 1;
        font-size: 12px;
        margin-top: 5px;
    }

    /** 卡片轮播图样式 */
    .admin-carousel .layui-carousel-ind {
        position: absolute;
        top: -41px;
        text-align: right;
    }

    .admin-carousel .layui-carousel-ind ul {
        background: 0 0;
    }

    .admin-carousel .layui-carousel-ind li {
        background-color: #e2e2e2;
    }

    .admin-carousel .layui-carousel-ind li.layui-this {
        background-color: #999;
    }

    /** 广告位轮播图 */
    .admin-news .layui-carousel-ind {
        height: 45px;
    }

    .admin-news a {
        display: block;
        line-height: 60px;
        text-align: center;
        border-radius: 4px;
    }
</style>
{/bolck}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-form">
            <div class="layui-form-item">
                <form action="{:request()->url()}" class="layui-form" method="get">
                    <div class="layui-btn-group" style="padding-left: 0px;">
                        <a href="{:url('index')}" class="layui-btn">销售图表</a>
                        <a href="{:url('operation')}" class="layui-btn"> 操作图表</a>
                        <a href="{:url('customer')}" class="layui-btn layui-btn-warm">客户报表</a>
                    </div>

                    
                </form>
            </div>
        </div>
        <hr class="layui-bg-gray">
        <div class="layui-row layui-col-space10">
        <!--数据-->
        <div class="layui-col-md2">
            <table class="layui-table layui-form">
                <thead>
                    <tr>
                        <th>省份</th>
                        <th>客户数</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="province" item="v" empty="$empty"}
                    <tr>
                        <td>{$v.province}</td>
                        <td>{$v.count_province_count}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div> 
        <!--数据-->
        <div class="layui-col-md2">
            <table class="layui-table layui-form">
                <thead>
                    <tr>
                        <th>分类名</th>
                        <th>客户数</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="classify" item="v" empty="$empty"}
                    <tr>
                        <td>{$v.name}</td>
                        <td>{$v.count_classify_count}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
        <!--数据-->
        <div class="layui-col-md2">
            <table class="layui-table layui-form">
                <thead>
                    <tr>
                        <th>来源</th>
                        <th>客户数</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="comefrom" item="v" empty="$empty"}
                    <tr>
                        <td>{$v.name}</td>
                        <td>{$v.count_comefrom_count}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
        <!--数据-->
        <div class="layui-col-md2">
            <table class="layui-table layui-form">
                <thead>
                    <tr>
                        <th>状态</th>
                        <th>客户数</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="status" item="v" empty="$empty"}
                    <tr>
                        <td>{$v.name}</td>
                        <td>{$v.count_status_count}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
        <!--数据-->
        <div class="layui-col-md2">
            <table class="layui-table layui-form">
                <thead>
                    <tr>
                        <th>销售类型</th>
                        <th>销售数</th>
                        <th>销售总额</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="order" item="v" empty="$empty"}
                    <tr>
                        <td>{$v.name}</td>
                        <td>{$v.count_num_count}</td>
                        <td>￥{:number_format($v.count_num_sum,2)}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
        <!--数据-->
        <div class="layui-col-md2">
            <table class="layui-table layui-form">
                <thead>
                    <tr>
                        <th>员工</th>
                        <th>客户数</th>
                        <th>销售总额</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach name="user" item="v" empty="$empty"}
                    <tr>
                        <td>{$v.name}</td>
                        <td>{$v.count_num_count}</td>
                        <td>￥{:number_format($v.count_price_sum,2)}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
        </div>
        
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script>
    laydate.render({
        elem: '#test16'
        ,range: '-'
    });
</script>
{/block}